
'MeaMod Playme
'Developed by The MeaMod Group
'Copyright 2009 The MeaMod Group
'http://meamod.com
'by James Weston
'--------------------------------
Imports LukeSw.Windows.Forms

Public NotInheritable Class frmAbout
    Dim MPlay As Integer
    Private CheckConn As New CheckInternetConnection()

    Private Sub frmAbout_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' Set the title of the form.
        'Dim ApplicationTitle As String
        'If My.Application.Info.Title <> "" Then
        'ApplicationTitle = My.Application.Info.Title
        'Else
        'ApplicationTitle = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
        'End If
        'Me.Text = String.Format("About {0}", ApplicationTitle)
        'Me.LabelCompanyName.Text = My.Application.Info.CompanyName
        'Me.TextBoxDescription.Text = My.Application.Info.Description
        txtProdVersion.Text = ("Version " & My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor & "." & My.Application.Info.Version.Build & "." & My.Application.Info.Version.Revision & " Monte Mercury")
        'txtProdVersion.Parent = imgLogo
        'txtProdVersion.BackColor = Color.Transparent
        labelUserName.Text = ("User Name: " & My.User.Name)
        labelOSDescription.Text = ("Operating System: " & My.Computer.Info.OSFullName)
        labelProductVersion.Text = ("Operating System Version: " & " " & My.Computer.Info.OSVersion)
        labelFramework.Text = (".NET Framework Version " & Environment.Version.ToString)
        txtCopyright.Text = (My.Application.Info.Copyright)
        MPlay = 0

        If CStr(CheckConn.IsConnected()) = False Then

        End If

        If My.Settings.AdvertDisable = False Then

        ElseIf My.Settings.AdvertDisable = True Then

        End If
    End Sub

    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        Me.Close()
    End Sub

    Private Sub btnSystemInfo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSystemInfo.Click
        My.Computer.Audio.Stop()
        Try
            Dim startInfo As New ProcessStartInfo("msinfo32.exe")
            startInfo.WindowStyle = ProcessWindowStyle.Normal
            Process.Start(startInfo)
        Catch ex As Exception
            MessageBox.Show("Microsoft System Informtion could not be found. Please contact you administrator", "MeaMod Playme", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        End Try
    End Sub

    Private Sub imgLogo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles imgLogo.Click
        If MPlay = 0 Then
            My.Computer.Audio.Play(My.Resources.resMercury, AudioPlayMode.BackgroundLoop)
            MPlay = 1
        ElseIf MPlay = 1 Then
            My.Computer.Audio.Stop()
            MPlay = 0
        End If
    End Sub

    Private Sub frmAbout_Deactivate(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Deactivate
        My.Computer.Audio.Stop()
    End Sub

    Private Sub imgGold_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles imgGold.Click
        'System.Diagnostics.Process.Start("http://meamod.com/certification/340823409823408.html")
        If CStr(CheckConn.IsConnected()) = False Then
            Dim vd As New VDialog()
            With vd
                .WindowTitle = "No Internet Connection"
                .MainIcon = VDialogIcon.SecurityError
                .Buttons = New VDialogButton() {New VDialogButton(VDialogResult.OK)}
                .DefaultButton = VDialogDefaultButton.Button1
                .MainInstruction = "No Internet Conntection Detected"
                .Content = "Unable to connect verification server." & vbCrLf & "No Internet Conntection Detected"
                .Sound = VDialogSound.Error
                .Show()
            End With
        ElseIf CStr(CheckConn.IsConnected()) = True Then
            frmMSC.ShowDialog()
        End If
    End Sub

    Private Sub imgDonate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles imgDonate.Click
        Try
            Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4126736")
        Catch ex As Exception
            MessageBox.Show("Unable to Launch the Donate utility. Please contact you administrator", "MeaMod Playme", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        End Try
    End Sub

    Private Sub pbAdvert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pbAdvert.Click
        Dim Proc As New System.Diagnostics.Process
        Proc.StartInfo.FileName = frmMain.AdvertURL
        Proc.Start()
    End Sub
End Class
